﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class AssemblyInitializerBase
   | FastReport OpenSource Class Reference </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class AssemblyInitializerBase
   | FastReport OpenSource Class Reference ">
    <meta name="generator" content="docfx 2.45.1.0">
    
    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    
    
    
  </head>
  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../logo.png" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div role="main" class="container body-content hide-when-search">
        
        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="FastReport.Utils.AssemblyInitializerBase">
  
  
  <h1 id="FastReport_Utils_AssemblyInitializerBase" data-uid="FastReport.Utils.AssemblyInitializerBase" class="text-break">Class AssemblyInitializerBase
  </h1>
  <div class="markdown level0 summary"><p>Base class for plugin's assembly initializer.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><span class="xref">System.Object</span></div>
    <div class="level1"><span class="xref">AssemblyInitializerBase</span></div>
      <div class="level2"><a class="xref" href="FastReport.AssemblyInitializer.html">AssemblyInitializer</a></div>
  </div>
  <div class="inheritedMembers">
    <h5>Inherited Members</h5>
    <div>
      <span class="xref">System.Object.ToString()</span>
    </div>
    <div>
      <span class="xref">System.Object.Equals(System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.GetHashCode()</span>
    </div>
    <div>
      <span class="xref">System.Object.GetType()</span>
    </div>
    <div>
      <span class="xref">System.Object.MemberwiseClone()</span>
    </div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="FastReport.Utils.html">FastReport.Utils</a></h6>
  <h6><strong>Assembly</strong>: FastReport.OpenSource.dll</h6>
  <h5 id="FastReport_Utils_AssemblyInitializerBase_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class AssemblyInitializerBase</code></pre>
  </div>
  <h5 id="FastReport_Utils_AssemblyInitializerBase_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>FastReport has an open architecture. That means you can extend it with own classes
such as report objects, wizards, export filters. Usually such classes are
placed in separate dlls (plugins). FastReport has mechanism to load plugin dlls. You can specify
which plugins to load at first start, in the FastReport configuration file (by default it is located in the
C:\Documents and Settings\User_Name\Local Settings\Application Data\FastReport\FastReport.config file).
To do this, add an xml item with your plugin name inside the &lt;Plugins&gt; item:</p>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?>
&lt;Config>
  &lt;Plugins>
    &lt;Plugin Name=&quot;c:\Program Files\MyProgram\MyPlugin.dll&quot;/>
  &lt;/Plugins>
&lt;/Config></code></pre>
<p>When you run your application and use the <strong>Report</strong> object first time, all plugins will be loaded.
To register objects contained in a plugin, FastReport searches for classes of type
<strong>AssemblyInitializerBase</strong> and instantiates them.</p>
<p>Use this class to register custom report objects, controls, wizards, exports that
are contained in the assembly. To do this, make your own class of the <strong>AssemblyInitializerBase</strong>
type and override its default constructor. In the constructor, call <strong>RegisteredObjects.Add</strong>
methods to register all necessary items.</p>
</div>
  <h3 id="constructors">Constructors
  </h3>
  
  
  <a id="FastReport_Utils_AssemblyInitializerBase__ctor_" data-uid="FastReport.Utils.AssemblyInitializerBase.#ctor*"></a>
  <h4 id="FastReport_Utils_AssemblyInitializerBase__ctor" data-uid="FastReport.Utils.AssemblyInitializerBase.#ctor">AssemblyInitializerBase()</h4>
  <div class="markdown level1 summary"><p>Registers plugins contained in this assembly.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public AssemblyInitializerBase()</code></pre>
  </div>
  <h5 id="FastReport_Utils_AssemblyInitializerBase__ctor_remarks">Remarks</h5>
  <div class="markdown level1 remarks"><p>This constructor is called automatically when the assembly is loaded.</p>
</div>
  <h5 id="FastReport_Utils_AssemblyInitializerBase__ctor_examples">Examples</h5>
  <p>This example show how to create own assembly initializer to register own items.</p>
<pre><code>public class MyAssemblyInitializer : AssemblyInitializerBase
{
  public MyAssemblyInitializer()
  {
    // register own wizard
    RegisteredObjects.AddWizard(typeof(MyWizard), myWizBmp, &quot;My Wizard&quot;, true);
    // register own export filter
    RegisteredObjects.AddExport(typeof(MyExport), &quot;My Export&quot;);
    // register own report object
    RegisteredObjects.Add(typeof(MyObject), &quot;ReportPage&quot;, myObjBmp, &quot;My Object&quot;);
  }
}</code></pre>

</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <div class="contribution">
                <ul class="nav">
                </ul>
              </div>
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
              <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            
            <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
